<?php

header('Content-type: text/html; charset=UTF-8');

@include_once('../../../includes/classes/class.Conexao.php');
@include_once('../../../includes/classes/class.Geral.php');

//======================================================================================
//==> Inicializar Classes
//======================================================================================
extract($_REQUEST);
$not  = new Persist;
	$not->sql = "SELECT * FROM produtos WHERE codigo LIKE '$q%'";
	
	if($not->ler() > 0){
		echo '<ul>'."\n";
		while( $not->ini() )
		{
		//$p = preg_replace('/(' . $q . ')/i', '<span style="font-weight:bold;">$1</span>', $p);
			echo "\t".'<li id="autocomplete_'.$not->id.'" rel="'.$not->id.'_' . $not->codigo . '">'. utf8_encode( $not->codigo ) .'</li>'."\n";
		}
		echo '</ul>';
	}
?>